Next: Positioning Point, Previous: User-Defined Specs, Up: Formatting Variables [Contents][Index]
There are specs for highlighting, and these are shared by all
the format variables. Text inside the
‘%(’ and ‘%)’
specifiers will get the special mouse-face property
set, which means that it will be highlighted (with
gnus-mouse-face) when you put the mouse pointer over
it.
Text inside the ‘%{’ and
‘%}’ specifiers will have their normal
faces set using gnus-face-0, which is
bold by default. If you say
‘%1{’, you’ll get
gnus-face-1 instead, and so on. Create as many faces
as you wish. The same goes for the mouse-face
specs—you can say ‘%3(hello%)’ to
have ‘hello’ mouse-highlighted with
gnus-mouse-face-3.
Text inside the ‘%<<’ and
‘%>>’ specifiers will get the
special balloon-help property set to
gnus-balloon-face-0. If you say
‘%1<<’, you’ll get
gnus-balloon-face-1 and so on. The
gnus-balloon-face-* variables should be either
strings or symbols naming functions that return a string. When
the mouse passes over text with this property set, a balloon
window will appear and display the string. Please refer to
Tooltips in The Emacs Manual, (in Emacs) or the
doc string of balloon-help-mode (in XEmacs) for more
information on this. (For technical reasons, the guillemets have
been approximated as ‘<<’ and
‘>>’ in this paragraph.)
Here’s an alternative recipe for the group buffer:
;; Create three face types.
(setq gnus-face-1 'bold)
(setq gnus-face-3 'italic)
;; We want the article count to be in
;; a bold and green face. So we create
;; a new face called my-green-bold.
(copy-face 'bold 'my-green-bold)
;; Set the color.
(set-face-foreground 'my-green-bold "ForestGreen")
(setq gnus-face-2 'my-green-bold)
;; Set the new & fancy format.
(setq gnus-group-line-format
"%M%S%3{%5y%}%2[:%] %(%1{%g%}%)\n")
I’m sure you’ll be able to use this scheme to create totally unreadable and extremely vulgar displays. Have fun!
Note that the ‘%(’ specs (and friends) do not make any sense on the mode-line variables.
Next: Positioning Point, Previous: User-Defined Specs, Up: Formatting Variables [Contents][Index]